package com.daidai.custom

import android.content.Context
import android.util.AttributeSet
import android.view.View
import com.daidai.tools.G
import com.daidai.spinner.R

class StyleView(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) :
    View(context, attrs, defStyleAttr) {
    init {
        val typeArr = context!!.obtainStyledAttributes(attrs, R.styleable.StyleView,defStyleAttr,0)
        G.elog("array lenght: ${typeArr.indexCount}")
        G.elog("attr1 =>  ${typeArr.getString(R.styleable.StyleView_attr1)}")
        G.elog("attr2 =>  ${typeArr.getString(R.styleable.StyleView_attr2)}")
        G.elog("attr3 =>  ${typeArr.getString(R.styleable.StyleView_attr3)}")
        G.elog("attr4 =>  ${typeArr.getString(R.styleable.StyleView_attr4)}")
        G.elog("attr5 =>  ${typeArr.getString(R.styleable.StyleView_attr5)}")
        G.elog("attr6 =>  ${typeArr.getString(R.styleable.StyleView_attr6)}")
        typeArr.recycle()
    }
}